import { zrRequest } from "./index"

export function queryOrderInfoList(url, data){
  return zrRequest.get({
    url,
    data
  })
}

export function queryOrderInfoDetail(id){
  return zrRequest.get({
    url: `detect/order/${id}`,
  })
}

export function receiveOrder(id){
  const data = {
    id
  }
  return zrRequest.post({
    url: "detect/order/takingOrder",
    data
  })
}

// 获取订单检测项
export function queryOrderProjectList(data){
  return zrRequest.get({
    url: "detect/project/inst/list",
    data
  })
}

// 获取订单检测项详情
export function queryProjectInstDetail(id){
  return zrRequest.get({
    url: `detect/project/inst/${id}`
  })
}

// 保存检修单
export function inspectorSaveOrder(data){
  return zrRequest.post({
    url: "detect/order/saveOrder",
    data
  })
}

// 图片上传
export function uploadImg(picBase64){
  const data = {
    content: picBase64
  }
  return zrRequest.post({
    url: "vehicleDetect/minProgram/uploadImg",
    data
  })
}

// 完成订单
export function completeOrder(data){
  return zrRequest.post({
    url: "detect/order/completeOrder",
    data
  })
}

// 订单查询---已接单的
export function queryListDetectOrder(data){
  return zrRequest.get({
    url: "detect/order/listDetectOrder",
    data
  })
}

//订单查询---通用的
export function queryListOrder(data){
  return zrRequest.get({
    url: "detect/order/list",
    data
  })
}

//查询数据统计
export function queryStatisticsOrder(data){
  return zrRequest.get({
    url: "detect/order/statisticsOrder",
    data
  })
}

